﻿@model IEnumerable<OdeToFoo.Models.Restaurant>

@{
    ViewBag.Title = "Home Page";
}

<form method="get">
    <input type ="search" name ="searchTerm"/>
    <input type ="submit" value ="Search By Name" />


</form>

@foreach (var item in Model)
{
    <div>
        <h4>@item.Name</h4>
        <div>@item.City , @item.Country</div>
        <p>@item.Description</p>
        <hr />
        @if (item.Review != null)
        {
            foreach (var review in item.Review)
            {
            <hr />
            <p>Rating = @review.Rating</p>
            <p>@review.Body</p>
            }
        }
    </div>
}
